<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Medium
  </div>
  <div>
   <h1 class="question_title">
    86. Partition List
   </h1>
   <p>
    Given a linked list and a value
    <em>
     x
    </em>
    , partition it such that all nodes less than
    <em>
     x
    </em>
    come before nodes greater than or equal to
    <em>
     x
    </em>
    .
   </p>
   <p>
    You should preserve the original relative order of the nodes in each of the two partitions.
   </p>
   <p>
    <strong>
     Example:
    </strong>
   </p>
   <pre>
<strong>Input:</strong> head = 1-&gt;4-&gt;3-&gt;2-&gt;5-&gt;2, <em>x</em> = 3
<strong>Output:</strong> 1-&gt;2-&gt;2-&gt;4-&gt;3-&gt;5
</pre>
  </div>
  <div>
   <h1 class="question_title">
    86. 分隔链表
   </h1>
   <p>
    给定一个链表和一个特定值
    <em>
     x
    </em>
    ，对链表进行分隔，使得所有小于
    <em>
     x
    </em>
    的节点都在大于或等于
    <em>
     x
    </em>
    的节点之前。
   </p>
   <p>
    你应当保留两个分区中每个节点的初始相对位置。
   </p>
   <p>
    <strong>
     示例:
    </strong>
   </p>
   <pre><strong>输入:</strong> head = 1-&gt;4-&gt;3-&gt;2-&gt;5-&gt;2, <em>x</em> = 3
<strong>输出:</strong> 1-&gt;2-&gt;2-&gt;4-&gt;3-&gt;5
</pre>
  </div>
 </body>
</html>